#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]\[\033[0;33m\][\t]\[\033[01;34m\]\w\[\033[00m\]\$ '

# alias to restart iwd.service
alias fixwifi='sudo systemctl restart iwd.service'

# alias to ping to www.baidu.com for testing the network connection
alias testinet='ping www.baidu.com'

# alias to add executable permissions to a file
alias addx='chmod +x'

# alias to set screen layout
alias sdd='~/.screenlayout/dual-with-desktop-monitor.sh && ~/.fehbg'
# meanwhile disable touchpad and keyboard on laptop
alias sd='~/.screenlayout/dual-with-desktop-monitor.sh && (\
	~/.fehbg;\
	input-device.sh --mute disable touchpad;\
	input-device.sh --mute disable "AT Translated Set 2 keyboard" )'
alias ss='~/.screenlayout/single-monitor.sh && (\
	~/.fehbg;\
	input-device.sh --mute enable touchpad;\
	input-device.sh --mute enable "AT Translated Set 2 keyboard" )'

# show tty-clock
alias clock='tty-clock -s -c -n'

# alias to refresh current pwd
#alias fr='cd $(pwd)'

alias lg='lazygit'

alias ra='ranger'

alias cdda='cataclysm'
alias push-cdda-saves='cd ~/.local/share/cataclysm-dda/save && (\
	git add . && \
	git commit -m "saved at $(date +%Y%m%d-%H.%M.%S) on laptop" && \
	git push origin master) ; \
	cd -'
alias pull-cdda-saves='cd ~/.local/share/cataclysm-dda/save && \
	git pull origin master ; \
	cd -'
